package model

import "github.com/jinzhu/gorm"

type Teacher struct {
	gorm.Model
	Name    string     `gorm:"type:varchar(20);not null" json:"name"` // 教师姓名
	Age     int        `gorm:"type:int;not null" json:"age"`          // 教师年龄
	Class   []*Class   `gorm:"many2many:class_teachers"`              // 所教授的班级列表
	Student []*Student `gorm:"many2many:teacher_students"`            // 学生列表
}
